<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者，助力中小企业发展
// +----------------------------------------------------------------------
// | Copyright (c) 2017～2024  www.wdadmin.cn    All rights reserved.
// +----------------------------------------------------------------------
// | Wdadmin系统产品软件并不是自由软件，不加密，并不代表开源，未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn>   www.wdadmin.cn
// +----------------------------------------------------------------------
/**
 * Class City
 * Desc  城市控制器
 * Create on 2024/10/30 9:08
 * Create by wangyafang
 */

namespace app\api\controller\wddj\usert\operation;


use app\common\controller\Api;

class City extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];
    protected $model = null;

    public function _initialize()
    {
        parent::_initialize();
        $this->model = new \app\api\model\wddj\usert\operation\City();
    }

    /**
     * Desc 开通城市
     * Create on 2024/10/30 9:40
     * Create by wangyafang
     */
    public function index()
    {
        if (!$this->request->isGet()) {
            $this->error('请求类型错误');
        }

        $order = 'weigh desc,id desc';

        $data = $this->model
            ->where('status','normal')
            ->field("id,city")
            ->order($order)
            ->select();

        $this->success('请求成功',$data);
    }
}



 